class Solution(object):
    def isSubsequence(self, s, t):
        """
        :type s: str son
        :type t: str father
        :rtype: bool
        """
        i = j = 0
        len_s = len(s)
        len_t = len(t)
        while i < len_s and j < len_t:
            if s[i] == t[j]:
                i += 1
                j += 1
            else:
                j += 1
        if i == len_s:
            return True
        else:
            return False


solution = Solution()
res = solution.isSubsequence('axc', 'ahbgdc')
print(res)
